<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="<?php echo __PUBLIC__?>/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="<?php echo __PUBLIC__?>/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="<?php echo __PUBLIC__?>/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="<?php echo __PUBLIC__?>/Flat/img/favicon.ico">
	   
	</head>
	<body>
		<form method="post" enctype="multipart/form-data">
			<div class="alert alert-success">添加品牌</div>
			<div class="form-group">
				<label for="exampleInputEmail1">品牌名称</label>
				<input id="exampleInputEmail1" class="form-control" type="text" name="bname" value="<?php echo $oldData['bname'];?>">
			</div>
			
			<script src="./Public/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
			<script type="text/javascript">
				//alert(1);
				$(function(){
					//alert(1);
					//单击事件
					$('.close_img').click(function(){
						//alert(1);
						//移出图片
						$(".img_div").remove();
						//添加input
						$(".file_div").html('<input id="exampleInputEmail1" type="file" name="logo">');
					})
				})
			</script>
			<div class="form-group">
				<label for="exampleInputEmail1">缩略图</label>
				<?php if($oldData['logo']){?>
				<div class="img_div">
					<img src="<?php echo $oldData['logo']?>"/>
					<a href="javascript:;" class="close_img">X</a>
					<input id="exampleInputEmail1" type="hidden" name="logo" value="<?php echo $oldData['logo']?>">
				</div>
				<?php }else{?>
					<input id="exampleInputEmail1" type="file" name="logo">
				<?php }?>
				<div class="file_div">
						
				</div>
				
				
			</div>
			<div class="form-group">
				<label for="exampleInputEmail1">排序</label>
				<input id="exampleInputEmail1" class="form-control" type="text" name="sort" value="<?php echo $oldData['sort']?>">
			</div>
			<input type="hidden" name="bid" id="bid" value="<?php echo $_GET['bid']?>" />
			<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
